@namespace NewLife.CubeBlazor.Razor.Shared.Layouts
@inherits CubeComponentBase

@if (Items.Any())
{
    <div class="d-flex block-center" style="@Style">
        <MBreadcrumbs Routable Class="pa-0">
            <DividerContent>
                <div class="mx-2" style="height:16px;width:0.5px;border: 0.5px solid #A3AED0;" />
            </DividerContent>
            <ChildContent>
                <MBreadcrumbsItem Href="javascript:history.back(-1)">
                    <MIcon Size=20 Color="default-lighten-2">mdi-arrow-left</MIcon>
                </MBreadcrumbsItem>
                @for (var i = 0; i < Items.Count; i++)
                {
                    var item = Items[i];
                    var isLast = i == Items.Count - 1;
                    <MBreadcrumbsItem @key="@item" Href="@item.Href">
                        <span class="@(isLast ? "text-subtitle2 default-lighten-2--text" : "text-body2")">@T(item.Text)</span>
                    </MBreadcrumbsItem>
                }
            </ChildContent>
        </MBreadcrumbs>
    </div>
}

@code{
    [Parameter]
    public string Style { get; set; }
}
